﻿using demo1.Entity;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;

namespace demo1.Controllers
{
    [ApiController]
    [Route("controller/[Action]")]
    public class TeatherControll:ControllerBase
    {
        SqlSugarClient _db;
        public TeatherControll(SqlSugarClient db)
        {
            _db = db;
        }
        [HttpGet]
        public async Task<List<Teather>> GetTeather([FromQuery] string? id)
        {
            var list=await _db.Queryable<Teather>().ToListAsync();
            return list;
        }
    }
}
